package com.shangxia.rachel.business.login.Controller;

import com.alibaba.fastjson.JSONObject;
import com.shangxia.rachel.model.entity.Dict;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @ProjectName: rachel
 * @ClassName: LoginController
 * @Time: 2020/6/8
 * @Author: zy9524
 * @Description:
 * @Experience:
 */

@Slf4j
@Controller
@ResponseBody
public class LoginController {

    /**
     * @param
     * @return
     * @throws
     * @title   
     * @author zy9524
     * @updateTime 2020/6/11 22:07
     * @description TODO
     */
    @RequestMapping(value = "/",method = RequestMethod.GET)
    public String  home(){
        return "index.html";
    }

    /**
     * 
     * @param dict
     * @return
     */
    @PostMapping("/hello")
    public JSONObject hello(@RequestBody Dict dict) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("dict",dict);
        return  jsonObject;
    }
}
